package com.example.recruitment.mapper;

import com.example.recruitment.entity.Resume;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface ResumeMapper {
    List<Resume> findAll();
    
    Resume findById(Long id);
    
    List<Resume> findByUserId(Long userId);
    
    List<Resume> findByJobId(Long jobId);
    
    int insert(Resume resume);
    
    int update(Resume resume);
    
    int deleteById(Long id);
    
    int updateStatus(@Param("id") Long id, @Param("status") String status);
    
    long count();
    
    List<Resume> findLatest(int limit);
    
    @Select("SELECT COUNT(*) FROM resume WHERE status = #{status}")
    long countByStatus(@Param("status") String status);
} 